Skip to content

Comments

feat: integrate pyannote-cloud into listener2 plugin#4161

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1771771767-integrate-pyannote-cloud-listener2
Open

feat: integrate pyannote-cloud into listener2 plugin#4161
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1771771767-integrate-pyannote-cloud-listener2

Conversation

@devin-ai-integration
Copy link
Contributor

feat: integrate pyannote-cloud into listener2 plugin

Summary

Adds pyannote-cloud as a new batch transcription provider in the listener2 plugin. Unlike existing providers that use WebSocket streaming via owhisper-client adapters, pyannote uses a REST-based async job model:

  1. Upload local audio file to pyannote's temporary storage via media:// presigned URLs
  2. Submit a diarization+transcription job (POST /v1/diarize with transcription: true)
  3. Poll GET /v1/jobs/{jobId} until completion (2s interval, 10min timeout)
  4. Map pyannote's TranscriptionSegment results into the existing owhisper_interface::batch::Response format

Changes:

  • plugins/listener2/Cargo.toml — added hypr-pyannote-cloud, reqwest, serde_json, uuid deps
  • plugins/listener2/src/error.rs — added Pyannote(String) error variant
  • plugins/listener2/src/ext.rs — added BatchProvider::Pyannote variant + ~250 lines of implementation (make_pyannote_client, pyannote_upload_audio, pyannote_poll_job, pyannote_diarization_to_batch_response, run_batch_pyannote)

Review & Testing Checklist for Human

  • Response mapping correctness: pyannote_diarization_to_batch_response prefers word_level_transcription over turn_level_transcription. Verify that the word-level segments from pyannote actually have per-word granularity (not full sentences), and that the space-joined transcript makes sense for both levels.
  • Confidence is hardcoded to 1.0: pyannote doesn't provide per-word confidence. Verify downstream consumers handle this synthetic value correctly and don't misinterpret it.
  • listen_params / model are not forwarded: run_batch_pyannote ignores languages, keywords, and model from BatchParams. The DiarizeRequest.model is set to None (defaults to precision-2). Decide if params.model should be forwarded.
  • Entire audio file read into memory (tokio::fs::read): Could be an issue for very large recordings. Other providers use chunked streaming.
  • Test end-to-end with a real pyannote API key: This code compiles but was not runtime-tested. The upload → diarize → poll → map flow needs real-world verification.

Notes

  • The GetJobByIdResponse is #[serde(untagged)] with DiarizationJob as the first variant, which means it will greedily match diarization responses. This works for the diarize use case but the enum ordering matters.
  • The pyannote client is built with a custom reqwest::Client that includes Authorization: Bearer {api_key} headers. The presigned URL upload uses a separate unauthenticated client (correct behavior).
  • Poll timeout is 10 minutes (PYANNOTE_POLL_TIMEOUT), poll interval is 2 seconds (PYANNOTE_POLL_INTERVAL).

Link to Devin run: https://app.devin.ai/sessions/855b2a5608234efaab84b8aaec1a9550
Requested by: @yujonglee

- Add hypr-pyannote-cloud dependency to listener2
- Add BatchProvider::Pyannote variant
- Implement run_batch_pyannote with media upload, diarization job submission, polling, and response mapping
- Add Pyannote error variant to error.rs
- Map pyannote TranscriptionSegments to owhisper batch::Response format with speaker indices

Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Feb 22, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit fb9921d
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/699b197f09f37a0008219c22

@netlify
Copy link

netlify bot commented Feb 22, 2026

Deploy Preview for hyprnote canceled.

Name Link
🔨 Latest commit fb9921d
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/699b197f8900220008174544

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant